<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_quiz_question_answer".
 *
 * @property string $id 主键
 * @property string $ques_id 问题id
 * @property string $answ_code 答案的编号（ABC/123）
 * @property string $answ_content 答案内容
 * @property string $is_right 是否正确答案
 * @property string $answ_note 对该答案的分析
 * @property int $sequence 排序
 * @property double $score 分值
 * @property string $create_by 创建人
 * @property string $create_time 创建时间
 * @property string $update_by 更新人
 * @property string $update_time 更新时间
 * @property int $del_flag 删除标示
 */
class TQuizQuestionAnswer extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_quiz_question_answer';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['answ_content', 'answ_note'], 'string'],
            [['sequence', 'del_flag'], 'integer'],
            [['score'], 'number'],
            [['create_time', 'update_time'], 'safe'],
            [['id', 'ques_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['answ_code'], 'string', 'max' => 8],
            [['is_right'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', '主键'),
            'ques_id' => Yii::t('app', '问题id'),
            'answ_code' => Yii::t('app', '答案的编号（ABC/123）'),
            'answ_content' => Yii::t('app', '答案内容'),
            'is_right' => Yii::t('app', '是否正确答案'),
            'answ_note' => Yii::t('app', '对该答案的分析'),
            'sequence' => Yii::t('app', '排序'),
            'score' => Yii::t('app', '分值'),
            'create_by' => Yii::t('app', '创建人'),
            'create_time' => Yii::t('app', '创建时间'),
            'update_by' => Yii::t('app', '更新人'),
            'update_time' => Yii::t('app', '更新时间'),
            'del_flag' => Yii::t('app', '删除标示'),
        ];
    }
}
